package com.epfly.iface.promo.activity.enums;


import com.google.common.collect.Maps;

import java.util.Map;

/**
 * 餐别:0.不限;1.早餐;2.午餐;3.晚餐;4.夜宵;5.副正餐;
 */
public enum ActivityRuleDinnerTypeEnum {

    UN_LIMIT((byte) 0, "不限"), BREAKFAST((byte) 1, "早餐"), LUNCH((byte) 2, "午餐"),
    SUPPER((byte) 3, "晚餐"), NIGHT((byte) 4, "夜宵"), SNACK((byte) 5, "副正餐"),

    ;

    private final Byte key;

    private final String value;


    ActivityRuleDinnerTypeEnum(Byte key, String value) {
        this.key = key;
        this.value = value;
    }

    private static final Map<Byte, ActivityRuleDinnerTypeEnum> loopUp = Maps.newHashMap();

    static {
        for (ActivityRuleDinnerTypeEnum value : values()) {
            loopUp.put(value.getKey(), value);
        }
    }

    public static String getValue(Byte key) {
        return loopUp.get(key).getValue();
    }

    public Byte getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
